package ar.edu.utn.frsf.proyectofinal.sistemadecontrolmodbus.devicecontroller;

import net.wimpi.modbus.io.ModbusTransport;
import ar.edu.utn.frsf.proyectofinal.sistemadecontrolmodbus.devicecontroller.command.Command;
import ar.edu.utn.frsf.proyectofinal.sistemadecontrolmodbus.devicecontroller.imp.ActualizationConnectionHandler;
import ar.edu.utn.frsf.proyectofinal.sistemadecontrolmodbus.devicecontroller.imp.AutomaticConnectionHandler;

public interface DeviceManager {

	boolean isConnected();

	boolean isTryingConection();

	void connect();

	void disconnect();

	void execute(Command cmd);

	void addDeviceChangeListener(DeviceChangeListener list);

	void removeDeviceChangeListener(DeviceChangeListener list);

	void initAutomaticConnection(ModbusTransport incoming, AutomaticConnectionHandler automaticConnectionHandler);

	boolean isActualizing();

	void initActualization(ModbusTransport incoming, ActualizationConnectionHandler actualizationConnectionHandler);
	
	public DeviceState getState();

	ProcessImageDated getProcessImage();

}
